#include "split_string.h"

vector<string> split(const string & line, char x){

	if (line.empty()){

		vector<string> blank;

		return blank;

	}

	vector<string> end;

	int a = 0;

	int b = 0;

	while (a<line.length()){

		if (line[b]==x||line[b]=='\0'){

			end.push_back(line.substr(a, b - a));

			b++;

			a = b;

		}
		else{

			b++;

		}
	}

	return end;

}
